package org.hzy.entity;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

import org.hibernate.annotations.Entity;
import org.hibernate.annotations.Table;

/**
 * Dept entity. @author MyEclipse Persistence Tools
 */
public class Dept implements java.io.Serializable {

	// Fields
	private Integer deptno;
	private String dname;
	private String loc;
	
	private Set emps=new HashSet();  //hibernate会自己实例化变成持久化集合persientset
	
//	private List emps=new ArrayList();
	
//	private Map emps=new HashMap();
	// Constructors
	
	public Set getEmps() {
		return emps;
	}

	public void setEmps(Set emps) {
		this.emps = emps;
	}

	/** default constructor */
	public Dept() {
	}

	/** minimal constructor */
	public Dept(Integer deptno) {
		this.deptno = deptno;
	}

	/** full constructor */
	public Dept(Integer deptno, String dname, String loc) {
		this.deptno = deptno;
		this.dname = dname;
		this.loc = loc;
	}

	// Property accessors

	public Integer getDeptno() {
		return this.deptno;
	}

	public void setDeptno(Integer deptno) {
		this.deptno = deptno;
	}

	public String getDname() {
		return this.dname;
	}

	public void setDname(String dname) {
		this.dname = dname;
	}

	public String getLoc() {
		return this.loc;
	}

	public void setLoc(String loc) {
		this.loc = loc;
	}

}